package com.uinfor.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @descripttion:
 * @Author: WZH
 * @Date :2021/1/21  10:46
 **/
@RestController
@Slf4j
public class ConsumerOrderConsulController {
    private static final String  URL="http://consul-provider-payment";
    @Resource
    private RestTemplate restTemplate;
    @GetMapping("/consumer/consul")
    public String paymentInfo(){
        return restTemplate.getForObject(URL+"/payment/consul",String.class);
    }
}
